
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
load-templates
Advanced tools
Load templates.
npm i load-templates --save
var Loader = require('load-templates');
var loader = new Loader();
Throw some disorganized templates into the load method:
loader.load('a.md', {a: 'b'});
loader.load('*.md', {a: 'b'});
loader.load(['*.md'], {a: 'b'});
loader.load({path: 'a.md', a: 'b'});
loader.load({'a.md': {path: 'a.md', a: 'b'}});
And get shiny, normalized template objects back:
{ 'a.md': {path: 'a.md', content: 'this is content.', a: 'b'},
'b.md': {path: 'b.md', content: 'this is content.', a: 'b'},
'c.md': {path: 'c.md', content: 'this is content.', a: 'b'}}
See the docs and tests for valid formats. WIP.
Install dev dependencies.
npm i -d && npm test
Or run gulp
.
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Jon Schlinkert
Copyright (c) 2014-2015 Jon Schlinkert
Released under the MIT license
This file was generated by verb-cli on March 22, 2015.
FAQs
Load templates/views using globs, file paths, objects, arrays, or key-value pairs.
The npm package load-templates receives a total of 52,808 weekly downloads. As such, load-templates popularity was classified as popular.
We found that load-templates demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.